home *** CD-ROM | disk | FTP | other *** search
/ Almathera Ten Pack 3: CDPD 3 / Almathera Ten on Ten - Disc 3: CDPD3.iso / scope / 176-200 / scopedisk180 / arexxtutorial / dtm_host / dtm_host.doc < prev    next >
Text File  |  1995-03-19  |  4KB  |  167 lines

  1.               DTM Host Documentation
  2.                 Sep 1, 1989
  3.  
  4.  
  5.  
  6. WHO:
  7.  
  8.     Copyright © 1989 by Donald T. Meyer, Stormgate Software
  9.     All Rights Reserved
  10.     This function host may be freely distributed via BBS and Freeware
  11.     collections on diskette.
  12.     Commercial use is with the written consent of Donald T. Meyer only.
  13.  
  14.     Stormgate Software
  15.     P.O. Box 383
  16.     St. Peters, MO  63376
  17.  
  18.     E-Mail can be sent via the following:
  19.     BIX:    donmeyer        (almost daily)
  20.     GEnie:    D.MEYER            (weekly)
  21.     PLINK:    Stormgate        (weekly)
  22.  
  23.  
  24.  
  25. WHAT:
  26.  
  27. An ARexx function host.
  28.  
  29.  
  30.  
  31. DESCRIPTION:
  32.  
  33. This ARexx function host, which is written using my freely distibutable
  34. function host source code (available on various communications services),
  35. contains a variety of functions.
  36. These extend the ARexx language in ways that I have found usefull.
  37. As time goes by, this function host will probably grow.
  38. Some of these are generally usefull, and some (getprefs() comes to mind)
  39. were added for one specific need.  Please send me any bugs, comments,
  40. or suggestions that you care to.
  41.  
  42.  
  43.  
  44. TO USE IT:
  45.  
  46. Merely type "dtm_host" at a CLI, or double-click from WorkBench.
  47.  
  48. When executed, this function host will detach and run in the background
  49. (if started from a CLI, there is no need to "run" or "runback" it).
  50. It will automaticly add itself to the ARexx library list.
  51. This may be started from either CLI or WorkBench, and the normal stack
  52. size of 4096 is just fine.
  53. Once running, the various functions defined herein are accessible
  54. simply by using them in any ARexx program.
  55.  
  56. For more information on ARexx Function Hosts, see Chapter 6 in the
  57. ARexx manual.
  58.  
  59.  
  60. To remove it, simply type "dtm_host -q" from the CLI, or start it from
  61. the WorkBench again.  It will take itself off of the ARexx library
  62. list and remove itself from memory.
  63.  
  64.  
  65.  
  66. LIST OF FUNCTIONS:
  67.  
  68.     DEBUG()
  69.     ENDSTRIP()
  70.     GETPREFS()
  71.     SHORTEN()
  72.     STRIP_TO_FILENAME()
  73.     TABEXPAND()
  74.  
  75.  
  76.  
  77.  
  78.     **********************************************************
  79.     **                            **
  80.     **        Function Descriptions            **
  81.     **                            **
  82.     **********************************************************
  83.  
  84. ----------------------------------------------------------------------
  85.  
  86.             DEBUG()
  87.  
  88.  
  89.     call debug( "Made it to here!" ) 
  90.  
  91. This will display the string either in the CLI this function host
  92. was started from, or, failing that, in a window opened by the report host.
  93. The text will have the ARexx program's name prepended, seperated by a
  94. colon.
  95. This is very usefull (IMHO) for keeping an eye on macros started from
  96. WorkBench applications.
  97.  
  98.  
  99. ----------------------------------------------------------------------
  100.  
  101.             ENDSTRIP()
  102.  
  103.  
  104.     newstring = endstrip( string1, string2 )
  105.  
  106. If 'string1' ends in 'string2' then remove 'string2' from
  107. the original string and return the new shorter string.  Main intent
  108. is to strip file extensions (of a known type) easily.
  109. This IS case-sensitive.
  110.  
  111.  
  112.  
  113. ----------------------------------------------------------------------
  114.  
  115.             GETPREFS()
  116.  
  117.  
  118.     prefs = getprefs()
  119.  
  120. Returns the Preferences structure.
  121. Currently the return is in "binary" format.  A possible enhancement
  122. would be to return various Preferences data fields as text.
  123.  
  124.  
  125.  
  126. ----------------------------------------------------------------------
  127.  
  128.             SHORTEN()
  129.  
  130.  
  131.     newstring = shorten( string, n )
  132.  
  133. Shorten the string by 'n' characters.  If the string is less than
  134. or equal to 'n' characters long, an empty string will result.
  135.  
  136.  
  137.  
  138. ----------------------------------------------------------------------
  139.  
  140.             STRIP_TO_FILENAME()
  141.  
  142.  
  143.     filename = strip_to_filename( fully-qualified-filename )
  144.  
  145. Takes a fully qualified path and filename and returns just
  146. the filename.  This function is NOT optimized, it was originally
  147. a quick-and-dirty example.
  148.  
  149.     filename( "df0:tests/startrek" )
  150.         returns -->  "startrek"
  151.  
  152.  
  153.  
  154. ----------------------------------------------------------------------
  155.  
  156.             TABEXPAND()
  157.  
  158.  
  159.     newstring = tabexpand( string, [n] )
  160.  
  161. Expand each tab in 'string' to ASCII blanks.  Tab expansion defaults
  162. to 8 if 'n' is not specified.
  163.  
  164.  
  165.  
  166. ----------------------------------------------------------------------
  167.